home *** CD-ROM | disk | FTP | other *** search
/ Graphics & Sound Program…ng Techniques for the Mac / Graphics and Sound Programming Techniques for the Mac.iso / Goodies / Sounds / Using Sounds In Your Programs
Encoding:
Text File  |  1995-08-13  |  1.2 KB  |  14 lines  |  [TEXT/ttxt]

  1. This CD holds several sound files. To use one from within a program you're developing, you'll need to extract the snd  resource from the sound file. If the sound is in the form of a System 7 sound file (as all of the sounds in the Sound Collections ƒ folder are), follow the steps listed below. If the sound is in a different file format, use one of the sound utility programs in the Sound File Converters ƒ folder to convert the file to a System 7 sound file.
  2.  
  3. Adding a snd  resource to your project's resource file:
  4.  
  5. 1. Launch your resource editor. 
  6. 2. Choose Open from the File menu and select the sound file of interest.
  7. 3. Copy the snd resource found in that file.
  8. 4. Open the resource file that is a part of the project you're working on.
  9. 5. Paste the copied sound resource into the project file. Note the resource ID number.
  10. 6. Save and close the files.
  11. 7. Open source code file from the project you're working on.
  12. 8. Add a call to GetResource() to load the sound. Use the correct resource ID number.
  13. 9. Add a call to SndPlay() to play the sound. 
  14. * For details concerning steps 8 and 9, refer to Chapter 2 of "Graphics and Sound Programming Techniques for the Mac", Dan Parks Sydow, M&T Books, 1995.